import type { ThemeVarBaseConfig } from '../service/base'
import { BaseThemeVarService } from '../service/base'
import { ThemeProperty } from '../types'

export class ActionThemeVarService extends BaseThemeVarService {
  private static instance: ActionThemeVarService

  static getInstance(): ActionThemeVarService {
    if (!ActionThemeVarService.instance) {
      ActionThemeVarService.instance = new ActionThemeVarService()
    }
    return ActionThemeVarService.instance
  }

  get selection(): ThemeVarBaseConfig {
    return {
      text: this.varMapper.getVarName({
        subElement: 'selection',
        property: ThemeProperty.Text,
      }),
      background: this.varMapper.getVarName({
        subElement: 'selection',
        property: ThemeProperty.Bg,
      }),
    }
  }
}
